package bean;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

@Entity
@Table(name = "t_blob")
public class BlobBEAN implements Serializable {
	@Id
	@Column(name = "blodid")
	private Integer blobId;

	private String name;

	// String类型映射为文本大字段
	
	@Basic(fetch=FetchType.LAZY)
	@Lob
	private String content;
	// 视频/图片等大字段映射为字节数组
	
	@Basic(fetch=FetchType.LAZY)
	@Lob
	private byte[] image;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public BlobBEAN(Integer blobId, String name, String content, byte[] image) {
		super();
		this.blobId = blobId;
		this.name = name;
		this.content = content;
		this.image = image;
	}

	public BlobBEAN() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Integer getBlobId() {
		return blobId;
	}

	public void setBlobId(Integer blobId) {
		this.blobId = blobId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public byte[] getImage() {
		return image;
	}

	public void setImage(byte[] image) {
		this.image = image;
	}

}
